package org.dna.metronomo.persistence;

import java.io.Serializable;

/**
 * Simple bean to represent a job (part of an activity). A Job never exists outside
 * of an owning Activity.
 * 
 * A Job is a single unit of work related to an Activity and could be expressed 
 * in days, hours, minutes.
 * @see org.dna.metronomo.persistence.Activity
 * */
public class Job implements Serializable {
	private static final long serialVersionUID = 4261691698348345720L;
	private int id;
	private String name;
	private String description;
	private TimePeriod elapsed;
	private Activity activity;
	
	public Job(String name, String description) {
		this();
		this.name = name;
		this.description = description;
	}
	
	public Job() {
		this.elapsed = new TimePeriod();
	}
	
	public int getId() {
		return id;
	}
	
	public void setName(String name) {
		this.name = name;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	

	public String getDescription() {
		return description;
	}

	public String getName() {
		return name;
	}

	public Activity getActivity() {
		return activity;
	}
	
	public TimePeriod getElapsed() {
		return elapsed;
	}

	public void setElapsed(TimePeriod effort) {
		this.elapsed = effort;
	}
}
